function TS = multTS(ts1, ts2)
% TS = multTS(ts1, ts2, dtype)  Multiply two TS structures, element by
% element (ts1 * ts2).  If ts2 is a scalar then multiply each element of ts1 by ts2.
%

TS = ts1;

if isstruct(ts2)
    TS.data = ts1.data .* ts2.data;
else
    if isstruct(ts1);
        TS.data = ts1.data .* ts2;
    else
        TS = ts1 .* ts2;
    end
end

return
